package org.codefinger.dao.callback;

import java.sql.ResultSet;

import org.codefinger.dao.impl.ResultSetCallback;

public class LongQueryCallback implements ResultSetCallback<Long> {

	public static final LongQueryCallback	INSTANCE	= new LongQueryCallback();

	private LongQueryCallback() {

	}

	@Override
	public Long getResult(ResultSet resultSet, String[] aliases) throws Throwable {
		if (resultSet.next()) {
			return resultSet.getLong(1);
		}
		return null;
	}

}
